import React, { Component } from 'react';
import { Switch, Route, Redirect } from 'react-router-dom'

// 首页  -- 底部菜单
import Footer from '@/components/Footer'

// 引入组件
import Detail from '@/views/Detail'
import Login from '@/views/login'
import Fav from '@/views/fav'


class index extends Component {
  render() {
    return (
      <Switch>
        {/* 定义路由规则 */}
        <Route exact path='/' component={Footer} />
        <Route path='/login' component={Login} />
        <Route path='/fav' component={Fav} />
        <Route path='/detail/:id' component={Detail} />
      </Switch>
    );
  }
}

export default index;
